xlab
{GGPLOT2}
Label the x axis (ggplot)
names
{base}
Retrieve names of a list/vector
attach
{base}
Attach Set of R Objects to Search Path
scale_y_continuous
{GGPLOT2}
Customise continuous y axis
c
{base}
Combine values/vectors into a vector
ylab
{GGPLOT2}
Label the y axis (ggplot)
levels
{base}
Get levels of a factor
is.element
{base}
Check if a value is element of a vector
aes
{GGPLOT2}
Construct aesthetic mapping of a ggplot graph
rm
{base}
Remove objects
setwd
{base}
Set Working Directory
stargazer
{stargazer}
Create a regression output table
lm
{base}
Fit a linear model
geom_smooth
{GGPLOT2}
Generates a smoothed conditional means curve / line
library
{base}
Load an R package
table
{base}
Obtain frequency table of a variable/cross-tabulation of two variables
relevel
{stats}
Reorder Levels of Factor
read.csv
{utils}
Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters
ggplot
{GGPLOT2}
Create a ggplot graph
read_dta
{haven}
Read a .dta file (Stata data)
as.numeric
{base}
Coerce a vector to numeric
t.test
{stats}
Performs one and two sample t-tests on vectors of data.
confint
{stats}
Calculate confidence Intervals for Model Parameters
droplevels
{base}
Drop Unused Levels from Factors
geom_point
{GGPLOT2}
Generates a scatter plot
theme_classic
{GGPLOT2}
A minimalistic theme with no gridlines
chisq.test
{stats}
Chi-Squared test (e.g. for cross-tabulations)
prop.table
{base}
Transform frequency table into table of proportions
ordered
{dplyr}
Create an ordered factor
read_excel
{readxl}
Read an Excel file
with
{base}
evaluate expression in the context of a data frame
recode
{dplyr}
Recode a variable
leveneTest
{car}
Computes Levene’s test for homogeneity of variance across groups.
prop.test
{stats}
Test of Equal or Given Proportions
as.character
{base}
Coerce a vector to character
summary
{base}
Obtain summary statistics or detailed regression output
subset
{base}
Return subsets of vectors, matrices or data frames which meet conditions.
scale_x_continuous
{GGPLOT2}
Customise continuous x axis
ls
{base}
Return a vector of character strings giving the names of the objects in the specified environment
ifelse
{base}
Return a or b depending on the value of test
mutate
{dplyr}
Modify/create a column in a data frame
log
{base}
log (default base = e)
cut
{base}
Convert Numeric to Factor
The end!